package com.mapmash.client;

import com.google.gwt.maps.client.geocode.DirectionResults;
import com.google.gwt.maps.client.geocode.DirectionsCallback;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.RootPanel;

public class DirectionsCallbackImpl implements DirectionsCallback{


	public void onFailure(int statusCode) {
		RootPanel.get("miles").add(new HTML("Failed to get directions"));
		
	}


	public void onSuccess(DirectionResults result) {
		RootPanel.get("miles").add(new HTML(result.getDistance().toString() + "miles"));
		
	}

}
